-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Use globals instead of metadata for std::autodiff #147390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use |
r? @jieyouxu since you already reviewed my last two test PRs I might as well directly assign you ^^ Thanks! (and please reroll if you're too busy!) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can r=me once tidy is green |
@bors r=jieyouxu rollup |
Use globals instead of metadata for std::autodiff LLVM's Metadata is quite fragile. In debug builds we use incremental compilation, which caused the metadata to be dropped. With this change we use named globals instead of metadata to instruct Enzyme how to differentiate functions. Globals are proper llvm values and thus can't be dropped. Also added an incremental/dbg test which now passes, to unblock the EnzymeAD CI which wants to run Rust autodiff tests. r? compiler
Rollup of 7 pull requests Successful merges: - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition) - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`) - #146865 (kcfi: only reify trait methods when dyn-compatible) - #147390 (Use globals instead of metadata for std::autodiff) - #147398 (Fix; correct placement of type inference error for method calls) - #147431 (compiletest: Read the whole test file before parsing directives) - #147433 (Fix doc comment) r? `@ghost` `@rustbot` modify labels: rollup
Use globals instead of metadata for std::autodiff LLVM's Metadata is quite fragile. In debug builds we use incremental compilation, which caused the metadata to be dropped. With this change we use named globals instead of metadata to instruct Enzyme how to differentiate functions. Globals are proper llvm values and thus can't be dropped. Also added an incremental/dbg test which now passes, to unblock the EnzymeAD CI which wants to run Rust autodiff tests. r? compiler
Rollup of 8 pull requests Successful merges: - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`) - #146865 (kcfi: only reify trait methods when dyn-compatible) - #147205 (Add a new `wasm32-wasip3` target to Rust) - #147390 (Use globals instead of metadata for std::autodiff) - #147398 (Fix; correct placement of type inference error for method calls) - #147422 (collect-license-metadata: Print a diff of the expected output) - #147431 (compiletest: Read the whole test file before parsing directives) - #147433 (Fix doc comment) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`) - #146865 (kcfi: only reify trait methods when dyn-compatible) - #147205 (Add a new `wasm32-wasip3` target to Rust) - #147390 (Use globals instead of metadata for std::autodiff) - #147398 (Fix; correct placement of type inference error for method calls) - #147422 (collect-license-metadata: Print a diff of the expected output) - #147431 (compiletest: Read the whole test file before parsing directives) - #147433 (Fix doc comment) r? `@ghost` `@rustbot` modify labels: rollup
LLVM's Metadata is quite fragile. In debug builds we use incremental compilation, which caused the metadata to be dropped. With this change we use named globals instead of metadata to instruct Enzyme how to differentiate functions.
Globals are proper llvm values and thus can't be dropped. Also added an incremental/dbg test which now passes, to unblock the EnzymeAD CI which wants to run Rust autodiff tests.
r? compiler